/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: yang
 * Date: 2022-04-29
 * Time: 22:56
 */
public class Main {
    public static int sum(int num){
        if(num==1){
            return num;
        }
        return num+sum(num-1);
    }
    public static void main(String[] args) {
        System.out.println(sum(10));
    }
}
